/*
 * Debug serial output module for Flying Fox
 *
 * by Zik Saleeba 2008-03-31
 */

#ifndef DEBUG_H
#define DEBUG_H

#include <stdarg.h>


/*
 * NAME:        dbgprintf_Init
 * ACTION:      Initialise the debugging system
 */
 
void dbgprintf_Init(void);


/*
 * NAME:        vdbgprintf
 * ACTION:      Debugging vprintf. Sends output to the serial radio interface
 */
 
void vdbgprintf(const char *format, va_list args);


/*
 * NAME:        dbgprintf
 * ACTION:      Debugging printf. Sends output to the serial radio interface
 */
 
void dbgprintf(const char *format, ...)
        __attribute__((format(printf, 1, 2)));

/*
 * NAME:        dbgprintd
 * ACTION:      Print a "double"
 * PARAMETERS:  double Num - the number to print
 */
 
void dbgprintd(double Num);

/*
 * NAME:        trace_LOG
 * ACTION:      For compatibility with Atmel code. Works
 *              similarly to dbgprintf().
 */
 
enum trace_level
{
    trace_DEBUG,
    trace_INFO,
    trace_WARNING,
    trace_ERROR
};

void trace_LOG(enum trace_level level, const char *format, ...)
        __attribute__((format(printf, 2, 3)));

#endif /* DEBUG_H */
